class P10878 {

	public static void main(String[] args) {
		String line = readLn();
		while (line != null) {
			if (!line.equals("___________")) {
				process(line);
			}
			line = readLn();
		}
	}
//	| o   .  o|
	private static void process(String line) {
		int ch = 0;
		int pow = 7;
		for (int k = 1; k < 6; k++) {
//			System.out.println(line.charAt(k));
			if (line.charAt(k) == 'o') {
				ch += Math.pow(2, pow);
			}
			pow--;
		}
		
		for (int k = 7; k < 10; k++) {
//			System.out.println(line.charAt(k));
			if (line.charAt(k) == 'o') {
				ch += Math.pow(2, pow);
			}
			pow--;
		}
		
		System.out.print((char)ch);
	}

	static String readLn() {
		String newLine = System.getProperty("line.separator");
		StringBuffer buffer = new StringBuffer();
		int car = -1;
		try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char) car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (java.io.IOException e) {
			return (null);
		}
		if ((car < 0) && (buffer.length() == 0))
			return (null);
		return (buffer.toString()).trim();
	}

}
